<?php

namespace App\Http\Controllers\Customer\Pages;

use App\Facades\ChargeRecordService;
use App\Facades\UserManager;
use App\Facades\UserService;
use App\Http\Controllers\Controller;
use App\Http\Requests;
use Illuminate\Http\Request;

class UserController extends Controller
{
    public function addUserManage()
    {
    	return view('infoManage');
    }
    public function addUserPersonalInfo()
    {
        $userInfo = UserService::getUserInfoByUser();
    	return view('personal')->with(['user_info' => $userInfo]);
    }
    public function addUserAfterServiceInfo()
    {
        $equipmentFailures = config('heting.equipment_failure');
    	return view('afterService')->with(['equipment_failures' => $equipmentFailures]);
    }
    public function addUserCheckPayment()
    {
        $userInfo = UserManager::getUser()->userInfo;
        $chargeRecords = ChargeRecordService::getChargeListByDeviceId($userInfo->current_device_id, null);
        return view('checkPayment')->with(['charge_records' => $chargeRecords]);
    }
    public function addUserPayFlux()
    {
        return view('payFlux');
    }

    public function payTest(Request $request)
    {
        return view('pay-test')->with(wxConfig([], $request));
    }

}
